public class HomeWork14_01{
    public static void main(String[] args){
        String[] arr = {
            "welcome", "china", "hi", 
            "congratulation", "great"
        };
        
        int index = StringMax.stringMax(arr);
        
        System.out.println(arr[index]);
    }
}

class StringMax{
    public static int stringMax(String[] arr){
        int index = 0;
        for(int i = 1; i < arr.length; i++){
            if(arr[index].length() < arr[i].length()){
                index = i;
            }
        }
        return index;
    }
}